/*
 * Copyright (C) 2010-2012 Susanta Tewari
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package coalescent.nb.jobs.properties.editors;

import coalescent.data.K69Data;
import commons.nb.data.gui.properties.editors.Builder_ExPE;
import commons.nb.data.gui.properties.editors.Builder_ExPE_IFactory;
import commons.nb.jobs.properties.editors.ComboBoxPropertyEditor;

/**
 * @since 1.4.0
 * @version version
 * @author Susanta Tewari
 * @history Created on Nov 9, 2012.
 */
public final class PropertyEditors {

    /**
     * Private constructor to disable instantiation.
     */
    private PropertyEditors() {}

    /**
     * Property editor that creates a combo box of available {@code K69Data} builders for property
     * {@link commons.nb.jobs.properties.BuilderProperty}.
     */
    public static class K69DataBuilder_ExPE extends Builder_ExPE<K69Data> {

        public K69DataBuilder_ExPE() {
            super(K69Data.class);
        }

        @Override
        public Class getAlternativePE() {
            return K69DataBuilder_ExPE_IFactory.class;
        }
    }

    public static class K69DataBuilder_ExPE_IFactory extends Builder_ExPE_IFactory<K69Data> {

        public K69DataBuilder_ExPE_IFactory() {
            super(K69Data.class);
        }

        @Override
        public Class getAlternativePE() {
            return K69DataBuilder_ExPE.class;
        }
    }

    /**
     * Property editor for K69 estimators..
     */
    public static class K69EstimatorPE extends ComboBoxPropertyEditor {

        public K69EstimatorPE() {
            super(new String[] { "Watterson" }, new String[] { "watterson" });
        }
    }

    /**
     * Property editor for KC64Data Options.
     */
    public static class KC64DataOptionsPE extends ComboBoxPropertyEditor {

        public KC64DataOptionsPE() {

            super(new String[] { "Infinite Alleles Data", "Infinite Sites Data" },
                  new String[] { "kc64DataOptions-an",
                                 "kc64DataOptions-k69Data" });
        }
    }

    /**
     * Property editor for KC64 likelihood algorithms.
     */
    public static class KC64LHoodAlgoPE extends ComboBoxPropertyEditor {

        public KC64LHoodAlgoPE() {

            super(new String[] { "Ewens Formula", "Recursion" }, new String[] { "esf-multi",
                    "exact-recursion-multi" });
        }
    }
}
